<template>
  <div class="paymentSettings">
    <el-card>
      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
        <el-tab-pane label="支付方式" name="1">
          <div class="el-card">
            <h3>支付方式</h3>
            <div class="paymentMethodBox">
              <p class="p">IOS:</p>
              <div class="ios">
                <div class="iosBox">
                  <img src="../../assets/image/pingguo.png" alt="" /><el-switch
                    style="display: block"
                    v-model="payPingguoA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="applePayStatus(payPingguoA)"
                  >
                  </el-switch>
                </div>
                <div class="iosBox">
                  <img src="../../assets/image/zhifubao.png" alt="" /><el-switch
                    style="display: block"
                    v-model="payZhifubaoA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="applePayZfbStatus(payZhifubaoA)"
                  >
                  </el-switch>
                </div>
                <div class="iosBox">
                  <img src="../../assets/image/weixin.png" alt="" /><el-switch
                    style="display: block"
                    v-model="payWeixinA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="applePayWxStatus(payWeixinA)"
                  >
                  </el-switch>
                </div>
              </div>
              <div>
                <p class="p">Android:</p>
                <div class="ios">
                  <div class="iosBox">
                    <img
                      src="../../assets/image/zhifubao.png"
                      alt=""
                    /><el-switch
                      style="display: block"
                      v-model="payZhifubaoB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="androidPayZfbStatus(payWeixinA)"
                    >
                    </el-switch>
                  </div>
                  <div class="iosBox">
                    <img src="../../assets/image/weixin.png" alt="" /><el-switch
                      style="display: block"
                      v-model="payWeixinB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="androidPayWxStatus(payWeixinA)"
                    >
                    </el-switch>
                  </div>
                </div>
              </div>
            </div>
            <h3>提现方式</h3>
            <div class="paymentMethodBox">
              <p class="p">IOS:</p>
              <div class="ios">
                <div class="iosBox">
                  <img src="../../assets/image/zhifubao.png" alt="" /><el-switch
                    style="display: block"
                    v-model="withdrawalZhifubaoA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="
                      withdrawalApplePayZfbStatus(withdrawalZhifubaoA)
                    "
                  >
                  </el-switch>
                </div>
                <div class="iosBox">
                  <img src="../../assets/image/weixin.png" alt="" /><el-switch
                    style="display: block"
                    v-model="withdrawalWeixinA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="
                      withdrawalApplePayWxStatus(withdrawalWeixinA)
                    "
                  >
                  </el-switch>
                </div>
              </div>
              <div>
                <p class="p">Android:</p>
                <div class="ios">
                  <div class="iosBox">
                    <img
                      src="../../assets/image/zhifubao.png"
                      alt=""
                    /><el-switch
                      style="display: block"
                      v-model="withdrawalZhifubaoB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="
                        withdrawalAndroidPayWxStatusAndroidAlipay(
                          withdrawalZhifubaoB
                        )
                      "
                    >
                    </el-switch>
                  </div>
                  <div class="iosBox">
                    <img src="../../assets/image/weixin.png" alt="" /><el-switch
                      style="display: block"
                      v-model="withdrawalWeixinB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="
                        withdrawalAndroidPayWxStatus(withdrawalWeixinB)
                      "
                    >
                    </el-switch>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <!-- <el-tab-pane label="提现方式" name="2">
          <div class="el-card">
            <div class="paymentMethodBox">
              <p class="p">IOS:</p>
              <div class="ios">
                <div class="iosBox">
                  <img src="../../assets/image/zhifubao.png" alt="" /><el-switch
                    style="display: block"
                    v-model="withdrawalZhifubaoA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="
                      withdrawalApplePayZfbStatus(withdrawalZhifubaoA)
                    "
                  >
                  </el-switch>
                </div>
                <div class="iosBox">
                  <img src="../../assets/image/weixin.png" alt="" /><el-switch
                    style="display: block"
                    v-model="withdrawalWeixinA"
                    active-color="#13ce66"
                    inactive-color="#ff4949"
                    :active-value="1"
                    :inactive-value="2"
                    disabled
                    @click.native="
                      withdrawalApplePayWxStatus(withdrawalWeixinA)
                    "
                  >
                  </el-switch>
                </div>
              </div>
              <div>
                <p class="p">Android:</p>
                <div class="ios">
                  <div class="iosBox">
                    <img
                      src="../../assets/image/zhifubao.png"
                      alt=""
                    /><el-switch
                      style="display: block"
                      v-model="withdrawalZhifubaoB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="
                        withdrawalAndroidPayWxStatusAndroidAlipay(
                          withdrawalZhifubaoB
                        )
                      "
                    >
                    </el-switch>
                  </div>
                  <div class="iosBox">
                    <img src="../../assets/image/weixin.png" alt="" /><el-switch
                      style="display: block"
                      v-model="withdrawalWeixinB"
                      active-color="#13ce66"
                      inactive-color="#ff4949"
                      :active-value="1"
                      :inactive-value="2"
                      disabled
                      @click.native="
                        withdrawalAndroidPayWxStatus(withdrawalWeixinB)
                      "
                    >
                    </el-switch>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane> -->
        <el-tab-pane label="汇率调整" name="2">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="inputBox">
                <el-input
                  placeholder="请输入宝石"
                  onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  v-model="gemstone"
                >
                  <template slot="prepend">1金币 = XX宝石</template>
                </el-input>
                <el-input
                  placeholder="请输入RMB"
                  onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  v-model="rmb"
                >
                  <template slot="prepend">1金币 = XXRMB</template>
                </el-input>
                <el-input
                  placeholder="请输入RMB"
                  onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  v-model="gemToRMB"
                >
                  <template slot="prepend">1宝石 = XXRMB</template>
                </el-input>
                <el-button @click="rechargeModify" class="btn"
                  >修改更新</el-button
                >
              </div>

              <p>调整记录</p>
              <el-table
                :data="tableData"
                v-loading="loading"
                style="width: 100%"
              >
                <el-table-column prop="creationTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="goldOrGemstone" label="金币:宝石">
                </el-table-column>
                <el-table-column prop="goldOrRmb" label="金币:RMB">
                </el-table-column>
                <el-table-column prop="gemstoneOrRmb" label="宝石:RMB">
                </el-table-column>
                <el-table-column prop="publisher" label="发布者">
                </el-table-column>
              </el-table>
              <pagination
                v-show="total > 0"
                :total="total"
                :page.sync="page"
                :limit.sync="pageSize"
                @pagination="getList"
              />
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="首充特惠" name="3">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="inputBox">
                <span class="signB">IOS</span>
                <div class="displayPage">
                  <el-input
                    placeholder="请输入RMB"
                    v-model="iosPrice"
                    onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                    onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  >
                  </el-input>
                  <p class="p">RMB</p>
                </div>
                <span class="sign">=</span>
                <div class="displayPage">
                  <el-input
                    placeholder="请输入金币"
                    v-model="iosCoin"
                    onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                    onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  >
                  </el-input>
                  <p class="p">金币</p>
                </div>

                <el-button @click="globalsetRenewFirstChargeBtn(2)" class="btn"
                  >修改更新</el-button
                >
                <el-switch
                  v-model="iosbol"
                  width="60"
                  class="tableScopeSwitch"
                  active-color="#13ce66"
                  active-text="上架"
                  inactive-color="#ccc"
                  inactive-text="下架"
                  @change="changeSwitch"
                >
                </el-switch>
              </div>

              <div class="inputBox">
                <span class="signB">Android</span>
                <div class="displayPage">
                  <el-input
                    placeholder="请输入RMB"
                    v-model="androidPrice"
                    onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                    onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  >
                  </el-input>
                  <p class="p">RMB</p>
                </div>
                <span class="sign">=</span>
                <div class="displayPage">
                  <el-input
                    placeholder="请输入金币"
                    v-model="androidCoin"
                    onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                    onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                  >
                  </el-input>
                  <p class="p">金币</p>
                </div>

                <el-button @click="globalsetRenewFirstChargeBtn(1)" class="btn"
                  >修改更新</el-button
                >
                <el-switch
                  v-model="androidbol"
                  width="60"
                  class="tableScopeSwitch"
                  active-color="#13ce66"
                  active-text="上架"
                  inactive-color="#ccc"
                  inactive-text="下架"
                  @change="changeSwitchA"
                >
                </el-switch>
              </div>

              <p>操作日志</p>
              <el-table
                :data="firstChargeTableData"
                v-loading="firstChargeLoading"
                style="width: 100%"
              >
                <el-table-column prop="createTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="operator" label="操作人">
                </el-table-column>
                <el-table-column prop="platform" label="系统">
                </el-table-column>
                <el-table-column prop="price" label="RMB"> </el-table-column>
                <el-table-column prop="coin" label="金币"> </el-table-column>
                <el-table-column prop="is_del" label="状态"> </el-table-column>
                <el-table-column prop="handleType" label="操作">
                </el-table-column>
              </el-table>
              <pagination
                v-show="firstChargeTotal > 0"
                :total="firstChargeTotal"
                :page.sync="firstChargePage"
                :limit.sync="firstChargePageSize"
                @pagination="firstChargeGetList"
              />
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="VIP充值档位" name="4">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <div class="btnBox">
                  <span>iosVip充值档位</span>
                  <el-button class="btn" @click="addIosRechargeGearBtn"
                    >新增档位</el-button
                  >
                </div>
                <el-table :data="tableDataB" style="width: 100%">
                  <el-table-column prop="coin" label="VIP类型">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.title"
                        placeholder="VIP类型"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="price" label="充值金额">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="充值金额"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="price" label="充值描述">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.describe"
                        placeholder="充值描述"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="oldamount" label="显示原价">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.oldamount"
                        placeholder="显示原价"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="oldamount" label="显示优惠(%)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.label"
                        placeholder="原价"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="rechargeid" label="充值ID">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.rechargeid"
                        placeholder="充值ID"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="vipday" label="天数">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.vipday"
                        placeholder="天数"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <!-- <el-table-column
                    prop="rechargeid"
                    label="与安卓关联(金币数量)"
                  >
                    <template slot-scope="scope">
                      <el-select
                        v-model="scope.row.prepaid"
                        placeholder="请选择关联"
                      >
                        <el-option
                          v-for="item in options"
                          :key="item.id"
                          :label="item.title"
                          :value="item.id"
                        >
                        </el-option>
                      </el-select>
                    </template>
                  </el-table-column>
                  <el-table-column prop="rechargeid" label="类型">
                    <template slot-scope="scope">
                      <el-select
                        v-model="scope.row.type"
                        placeholder="请选择关联"
                      >
                        <el-option
                          v-for="item in rechargeTypeOptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </el-select>
                    </template>
                  </el-table-column> -->
                  <el-table-column prop="publisher" label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="danger"
                        @click="
                          deleteIosRechargeGearBtn(scope.$index, scope.row)
                        "
                        >删除</el-button
                      >
                      <el-button
                        size="mini"
                        @click="
                          confirmIosRechargeGearBtn(scope.$index, scope.row)
                        "
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
              <div class="tableBox">
                <div class="btnBox">
                  <span>AndroidVIP充值档位</span>
                  <el-button class="btn" @click="addAndroidRechargeGearBtn"
                    >新增档位</el-button
                  >
                </div>
                <el-table :data="tableDataC" style="width: 100%">
                  <el-table-column prop="coin" label="VIP类型">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.title"
                        placeholder="VIP类型"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="price" label="充值金额">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="充值金额"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="price" label="充值描述">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.describe"
                        placeholder="充值描述"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="oldamount" label="显示原价">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.oldamount"
                        placeholder="显示原价"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="oldamount" label="显示优惠(%)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.label"
                        placeholder="原价"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="vipday" label="天数">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.vipday"
                        placeholder="天数"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <!-- <el-table-column prop="rechargeid" label="类型">
                    <template slot-scope="scope">
                      <el-select
                        v-model="scope.row.type"
                        placeholder="请选择关联"
                      >
                        <el-option
                          v-for="item in rechargeTypeOptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </el-select>
                    </template>
                  </el-table-column> -->
                  <el-table-column prop="publisher" label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="danger"
                        @click="
                          deleteAndroidRechargeGearBtn(scope.$index, scope.row)
                        "
                        >删除</el-button
                      >
                      <el-button
                        size="mini"
                        @click="
                          confirmAndroidRechargeGearBtn(scope.$index, scope.row)
                        "
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>

              <p>操作日志</p>
              <el-table
                :data="tableDataD"
                v-loading="loadingD"
                style="width: 100%"
              >
                <el-table-column prop="createTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="operator" label="操作人">
                </el-table-column>
                <el-table-column prop="platform" label="平台">
                </el-table-column>
                <el-table-column prop="coin" label="金币数量">
                </el-table-column>
                <el-table-column prop="rmb" label="充值金额"> </el-table-column>
                <el-table-column prop="id" label="充值ID"> </el-table-column>
                <el-table-column prop="label" label="显示优惠(%)">
                </el-table-column>
                <el-table-column prop="handleType" label="操作">
                </el-table-column>
              </el-table>
              <pagination
                v-show="totalB > 0"
                :total="totalB"
                :page.sync="pageB"
                :limit.sync="pageSizeB"
                @pagination="getListB"
              />
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="金币充值档位" name="5">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <div class="btnBox">
                  <span>iOS金币充值档位</span>
                  <el-button class="btn" @click="addIosCoinBtn"
                    >新增档位</el-button
                  >
                </div>
                <el-table
                  :data="coinTableDataA"
                  v-loading="coinLoadingA"
                  style="width: 100%"
                >
                  <el-table-column prop="coin" label="金币数量">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.coin"
                        placeholder="金币数量"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="price" label="充值金额">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="充值金额"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="rechargeid" label="充值ID">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.rechargeid"
                        placeholder="充值ID"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="label" label="标签">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.label"
                        placeholder="标签"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="describe" label="充值描述">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.describe"
                        placeholder="充值描述"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="givinggold" label="赠送金币">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.givinggold"
                        placeholder="赠送金币"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="danger"
                        @click="coinDelIosBtn(scope.$index, scope.row)"
                        >删除</el-button
                      >
                      <el-button
                        size="mini"
                        @click="coinConfirmationIosBtn(scope.$index, scope.row)"
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
              <div class="tableBox">
                <div class="btnBox">
                  <span>Android金币充值档位</span>
                  <el-button class="btn" @click="addAndroidCoinBtn"
                    >新增档位</el-button
                  >
                </div>
                <el-table :data="coinTableDataB" style="width: 100%">
                  <el-table-column prop="coin" label="金币数量">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.coin"
                        placeholder="金币数量"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="price" label="充值金额">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="充值金额"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <!-- <el-table-column prop="rechargeid" label="充值ID">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.rechargeid"
                        placeholder="充值ID"
                      ></el-input>
                    </template>
                  </el-table-column> -->
                  <el-table-column prop="label" label="标签">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.label"
                        placeholder="标签"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="describe" label="充值描述">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.describe"
                        placeholder="充值描述"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="givinggold" label="赠送金币">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.givinggold"
                        placeholder="赠送金币"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="danger"
                        @click="coinDelAndroidBtn(scope.$index, scope.row)"
                        >删除</el-button
                      >
                      <el-button
                        size="mini"
                        @click="
                          coinConfirmationAndroidBtn(scope.$index, scope.row)
                        "
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>

              <p>操作日志</p>
              <el-table
                :data="coinTableData"
                v-loading="coinLoading"
                style="width: 100%"
              >
                <el-table-column prop="createTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="operator" label="操作人">
                </el-table-column>
                <el-table-column prop="platform" label="平台">
                </el-table-column>
                <el-table-column prop="coin" label="金币数量">
                </el-table-column>
                <el-table-column prop="price" label="充值金额">
                </el-table-column>
                <el-table-column prop="id" label="充值ID"> </el-table-column>
                <el-table-column prop="msg" label="充值描述"> </el-table-column>
                <el-table-column prop="giving_gold" label="赠送金币">
                </el-table-column>
                <el-table-column prop="handleType" label="操作">
                </el-table-column>
              </el-table>
              <pagination
                v-show="coinTotal > 0"
                :total="coinTotal"
                :page.sync="coinPage"
                :limit.sync="coinPageSize"
                @pagination="coinGetList"
              />
            </div></div
        ></el-tab-pane>
        <el-tab-pane label="提现档位" name="6">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <div class="btnBox">
                  <span></span>
                  <el-button class="btn" @click="addWithdrawalPositionBtn"
                    >新增档位</el-button
                  >
                </div>
                <el-table :data="tableDataE" style="width: 100%">
                  <el-table-column prop="price" label="提现金额(元)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="提现金额(元)"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="所需宝石">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.coin"
                        placeholder="所需宝石"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="rechargeid" label="提现审核方式">
                    <template slot-scope="scope">
                      <el-select
                        v-model="scope.row.isaudit"
                        placeholder="请选择提现审核方式"
                      >
                        <el-option
                          v-for="item in isAuditOptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </el-select>
                    </template>
                  </el-table-column>
                  <el-table-column prop="credittsv" label="心动值">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.credittsv"
                        placeholder="心动值"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column prop="publisher" label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="danger"
                        @click="
                          deleteWithdrawalPositionBtn(scope.$index, scope.row)
                        "
                        >删除</el-button
                      >
                      <el-button
                        size="mini"
                        @click="
                          confirmWithdrawalPositionBtn(scope.$index, scope.row)
                        "
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
              <p>操作日志</p>
              <el-table
                :data="tableDataF"
                v-loading="loadingF"
                style="width: 100%"
              >
                <el-table-column prop="createTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="operator" label="操作人">
                </el-table-column>
                <el-table-column prop="rmb" label="提现金额"> </el-table-column>
                <el-table-column prop="coin" label="所需宝石">
                </el-table-column>
                <el-table-column prop="isAudit" label="提现审核方式">
                  <template slot-scope="scope">
                    <span>{{
                      scope.row.isAudit == 0 ? "自动到账" : "人工审核"
                    }}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="creditTsv" label="心动值">
                </el-table-column>
                <el-table-column prop="handleType" label="操作">
                </el-table-column>
              </el-table>
              <pagination
                v-show="totalC > 0"
                :total="totalC"
                :page.sync="pageC"
                :limit.sync="pageSizeC"
                @pagination="getListC"
              />
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="资料解锁收费" name="7">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <!-- <div class="btnBox">
                  <span></span>
                  <el-button class="btn" @click="addTimeChargeBtn"
                    >新增档位</el-button
                  >
                </div> -->
                <el-table :data="tableDataG" style="width: 100%">
                  <el-table-column prop="coin" label="类型">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.op_type"
                        placeholder="类型"
                        disabled
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="价格">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="价格"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <!-- <el-table-column prop="phase" label="顺序">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.phase"
                        placeholder="顺序"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="name" label="阶段">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.name"
                        placeholder="阶段"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="seconds" label="时长(秒)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.seconds"
                        placeholder="时长(秒)"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="普通用户收费(金币/秒)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.coin"
                        placeholder="收费(金币/秒)"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="奖励宝石(普通)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.reward"
                        placeholder="奖励宝石"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="VIP用户收费(金币/秒)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.coinB"
                        placeholder="收费(金币/秒)"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="coin" label="奖励宝石(VIP)">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.rewardB"
                        placeholder="奖励宝石"
                        onkeyup="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                        onafterpaste="this.value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column> -->

                  <el-table-column label="操作">
                    <template slot-scope="scope">
                      <!-- <el-button
                        size="mini"
                        type="danger"
                        @click="deleteTimeChargeBtn(scope.$index, scope.row)"
                        >删除</el-button
                      > -->
                      <el-button
                        size="mini"
                        @click="confirmTimeChargeBtn(scope.$index, scope.row)"
                        >{{ scope.row.id == "" ? "确认" : "更新" }}</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
              <p>操作日志</p>
              <el-table
                :data="tableDataH"
                v-loading="loadingH"
                style="width: 100%"
              >
                <el-table-column prop="createTime" label="创建时间">
                </el-table-column>
                <el-table-column prop="operator" label="操作人">
                </el-table-column>
                <el-table-column prop="op_type" label="类型"> </el-table-column>
                <el-table-column prop="price" label="价格"> </el-table-column>
                <el-table-column prop="handleType" label="操作">
                </el-table-column>
              </el-table>
              <pagination
                v-show="totalD > 0"
                :total="totalD"
                :page.sync="pageD"
                :limit.sync="pageSizeD"
                @pagination="getListD"
              />
            </div>
          </div>
        </el-tab-pane>

        <el-tab-pane label="信誉值预约价格" name="8">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <div class="btnBox">
                  <el-button
                    size="mini"
                    class="btn"
                    @click="creditBtn(tableDataI)"
                    >更新提交</el-button
                  >
                  <el-button class="btn" @click="addCreditBtn">新增</el-button>
                </div>
                <el-table :data="tableDataI" style="width: 100%">
                  <el-table-column prop="phase" label="信誉值">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.credit"
                        placeholder="信誉值"
                        oninput="value=value.replace(/[^\d]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="name" label="可设置价格">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.price"
                        placeholder="可设置价格"
                        oninput="value=value.replace(/[^\d]/g,'')"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" width="180">
                    <template slot-scope="scope">
                      <el-button size="mini" @click="delBtn(scope.$index)"
                        >删除</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
              <p>操作日志</p>
              <div class="el-tableBox">
                <el-table
                  :data="tableDataJ"
                  v-loading="loadingJ"
                  style="width: 100%"
                >
                  <el-table-column prop="createTime" label="创建时间">
                  </el-table-column>
                  <!-- <el-table-column prop="" label="原信誉值">
                </el-table-column>
                <el-table-column prop="op_type" label="原可设置价格">
                </el-table-column>-->
                  <el-table-column prop="operator" label="操作人">
                  </el-table-column>
                </el-table>
                <el-table :data="tableDataK" style="width: 100%">
                  <el-table-column prop="credit" label="原信誉值">
                  </el-table-column>
                  <el-table-column prop="price" label="原可设置价格">
                  </el-table-column>
                </el-table>
              </div>

              <!-- <pagination
                v-show="totalE > 0"
                :total="totalE"
                :page.sync="pageE"
                :limit.sync="pageSizeE"
                @pagination="getListE"
              /> -->
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="宝石兑换金币" name="9">
          <div class="el-card">
            <div class="paymentMethodBox">
              <div class="tableBox">
                <div class="btnBox">
                  <span>宝石兑换金币</span>
                  <el-button class="btn" @click="addGemstone"
                    >新增档位</el-button
                  >
                </div>
                <el-table :data="tableDataW" style="width: 100%">
                  <el-table-column align="center" prop="gold" label="金币">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.gold"
                        placeholder="输入兑换金额"
                      ></el-input>
                    </template>
                  </el-table-column>

                  <el-table-column
                    align="center"
                    prop="diamonds"
                    label="所需宝石"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.diamonds"
                        placeholder="输入所需宝石"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column prop="publisher" label="操作">
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        @click="delGemston(scope.$index, scope.row)"
                        type="danger"
                        >删除</el-button
                      >
                      <el-button @click="gemstonSubmit(scope.row)" size="mini"
                        >确认</el-button
                      >
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script>
import {
  rechargePaymentMethod,
  rechargeWithdrawalMethod,
  rechargeModify,
  rechargeBack,
  globalsetRechargeDemoList,
  globalsetAddRechargeDemo,
  globalsetAddWithdrawDemo,
  globalsetAddTimeDemo,
  globalsetDel,
  globalsetLog,
  globalsetFirstChargeList,
  globalsetRenewFirstCharge,
  globalsetAddGoldDemo,
  globalsetEditGoldDemo,
  globalsetAddDataBill,
  globalsetReservaPrice,
  getGemstoneList_api,
  editGemstoneList_api,
} from "@/api/SystemManagement";
import Pagination from "@/components/Pagination"; // 分页

export default {
  components: { Pagination },
  inject: ["reload"],
  data() {
    return {
      loading: true,
      firstChargeLoading: true,
      tableDataB: true,
      loadingD: true,
      coinLoading: true,
      coinLoadingA: true,
      loadingF: true,
      loadingH: true,
      loadingJ: true,
      activeName: "1",
      //支付方式
      payPingguoA: 1, //支付方式-苹果(苹果)
      payZhifubaoA: 1, //支付方式-支付宝(苹果)
      payWeixinA: 1, //支付方式-微信(苹果)
      payZhifubaoB: 1, //支付方式-支付宝(安卓)
      payWeixinB: 1, //支付方式-微信(安卓)
      //提现方式
      withdrawalZhifubaoA: 1, //提现方式-支付宝(苹果)
      withdrawalWeixinA: 1, //提现方式-微信(苹果)
      withdrawalZhifubaoB: 1, //提现方式-支付宝(安卓)
      withdrawalWeixinB: 1, //提现方式-微信(安卓)
      //汇率调整
      gemstone: "",
      rmb: "",
      gemToRMB: "",
      gemstoneIos: "",
      rmbIos: "",
      gemToRMBIos: "",
      tableData: [],
      total: 0,
      page: 1, //页码
      pageSize: 10, //每页条数
      //首充特惠
      iosPrice: "",
      iosCoin: "",
      iosbol: false,
      iosStatus: "0",
      androidPrice: "",
      androidCoin: "",
      androidbol: false,
      androidStatus: "0",
      firstChargeTableData: [],
      firstChargeTotal: 0,
      firstChargePage: 1, //页码
      firstChargePageSize: 10, //每页条数
      //充值档位
      tableDataB: [],
      tableDataC: [],
      tableDataD: [],
      totalB: 0,
      pageB: 1, //页码
      pageSizeB: 10, //每页条数
      options: [], //充值下拉框
      rechargeTypeOptions: [
        {
          value: "1",
          label: "金币",
        },
        {
          value: "2",
          label: "会员卡",
        },
      ],
      //金币充值
      coinTableDataA: [],
      coinTableDataB: [],
      coinTableData: [],
      coinTotal: 0,
      coinPage: 1, //页码
      coinPageSize: 10, //每页条数
      //提现档位
      WithdrawalGearBox: false,
      tableDataE: [],
      tableDataF: [],
      totalC: 0,
      pageC: 1, //页码
      pageSizeC: 10, //每页条数
      isAuditOptions: [
        {
          value: "1",
          label: "人工审核",
        },
        {
          value: "0",
          label: "自动到账",
        },
      ], //
      //计时收费
      tableDataG: [],
      tableDataH: [],
      totalD: 0,
      pageD: 1, //页码
      pageSizeD: 10, //每页条数
      //信誉值预约价格
      tableDataI: [],
      tableDataJ: [],
      tableDataK: [],
      totalE: 0,
      pageE: 1, //页码
      pageSizeE: 10, //每页条数

      // 宝石兑换金币
      tableDataW: [],
    };
  },
  methods: {
    changeSwitch(value) {
      console.log(value);
      if (value) {
        this.iosStatus = "0";
      } else {
        this.iosStatus = "2";
      }
      this.globalsetRenewFirstChargeBtn(2);
    },
    changeSwitchA(value) {
      console.log(value);
      if (value) {
        this.androidStatus = "0";
      } else {
        this.androidStatus = "2";
      }
      this.globalsetRenewFirstChargeBtn(1);
    },
    //删除信誉预约价格表行
    delBtn(index) {
      this.tableDataI.splice(index, 1);
    },
    //信息回调
    rechargeBack() {
      this.loading = true;
      rechargeBack({
        pageSize: this.pageSize,
        page: this.page,
      }).then((res) => {
        if (res.code == 0) {
          this.payPingguoA = res.data.payPingguoA;
          this.payZhifubaoA = res.data.payZhifubaoA;
          this.payWeixinA = res.data.payWeixinA;
          this.payZhifubaoB = res.data.payZhifubaoB;
          this.payWeixinB = res.data.payWeixinB;
          this.withdrawalZhifubaoA = res.data.withdrawalZhifubaoA;
          this.withdrawalWeixinA = res.data.withdrawalWeixinA;
          this.withdrawalZhifubaoB = res.data.withdrawalZhifubaoB;
          this.withdrawalWeixinB = res.data.withdrawalWeixinB;
          this.total = parseInt(res.data.total);
          this.tableData = res.data.list;
          this.loading = false;

          for (let i = 0; i < this.tableData.length; i++) {
            var num = this.tableData[0];
            this.gemstone = num.goldOrGemstone.split(":")[1];
            this.rmb = num.goldOrRmb.split(":")[1];
            this.gemToRMB = num.gemstoneOrRmb.split(":")[1];
          }
        }
      });
    },
    //支付方式-苹果支付
    applePayStatus(index) {
      this.$confirm("苹果支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.payPingguoA = 2;
          } else {
            this.payPingguoA = 1;
          }
          rechargePaymentMethod({
            iosApple: this.payPingguoA, //ios苹果 1开2关
            iosAlipay: this.payZhifubaoA, //ios支付宝 1开2关
            iosWeChat: this.payWeixinA, //ios微信
            androidAlipay: this.payZhifubaoB, //android支付宝
            androidWeChat: this.payWeixinB, //android微信
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-苹果 支付宝
    applePayZfbStatus(index) {
      this.$confirm("苹果支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.payZhifubaoA = 2;
          } else {
            this.payZhifubaoA = 1;
          }
          rechargePaymentMethod({
            iosApple: this.payPingguoA, //ios苹果 1开2关
            iosAlipay: this.payZhifubaoA, //ios支付宝 1开2关
            iosWeChat: this.payWeixinA, //ios微信
            androidAlipay: this.payZhifubaoB, //android支付宝
            androidWeChat: this.payWeixinB, //android微信
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-苹果 微信
    applePayWxStatus(index) {
      this.$confirm("苹果支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.payWeixinA = 2;
          } else {
            this.payWeixinA = 1;
          }
          rechargePaymentMethod({
            iosApple: this.payPingguoA, //ios苹果 1开2关
            iosAlipay: this.payZhifubaoA, //ios支付宝 1开2关
            iosWeChat: this.payWeixinA, //ios微信
            androidAlipay: this.payZhifubaoB, //android支付宝
            androidWeChat: this.payWeixinB, //android微信
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-android支付宝
    androidPayZfbStatus(index) {
      this.$confirm("安卓支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          index = this.payZhifubaoB;
          if (index == 1) {
            this.payZhifubaoB = 2;
            console.log(this.payZhifubaoB);
          } else if (index == 2) {
            this.payZhifubaoB = 1;
            console.log(this.payZhifubaoB);
          }

          rechargePaymentMethod({
            iosApple: this.payPingguoA, //ios苹果 1开2关
            iosAlipay: this.payZhifubaoA, //ios支付宝 1开2关
            iosWeChat: this.payWeixinA, //ios微信
            androidAlipay: this.payZhifubaoB, //android支付宝
            androidWeChat: this.payWeixinB, //android微信
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-android微信
    androidPayWxStatus(index) {
      this.$confirm("安卓支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          index = this.payWeixinB;
          if (index == 1) {
            this.payWeixinB = 2;
          } else {
            this.payWeixinB = 1;
          }
          rechargePaymentMethod({
            iosApple: this.payPingguoA, //ios苹果 1开2关
            iosAlipay: this.payZhifubaoA, //ios支付宝 1开2关
            iosWeChat: this.payWeixinA, //ios微信
            androidAlipay: this.payZhifubaoB, //android支付宝
            androidWeChat: this.payWeixinB, //android微信
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //提现方式-苹果支付宝
    withdrawalApplePayZfbStatus(index) {
      this.$confirm("苹果支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.withdrawalZhifubaoA = 2;
          } else {
            this.withdrawalZhifubaoA = 1;
          }
          rechargeWithdrawalMethod({
            iosAlipay: this.withdrawalZhifubaoA, //ios支付宝  1.开 2.关
            iosWeChat: this.withdrawalWeixinA, //ios微信  1.开 2.关
            androidAlipay: this.withdrawalZhifubaoB, //android支付宝  1.开 2.关
            androidWeChat: this.withdrawalWeixinB, //android微信  1.开 2.关
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-苹果微信
    withdrawalApplePayWxStatus(index) {
      this.$confirm("安卓支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.withdrawalWeixinA = 2;
          } else {
            this.withdrawalWeixinA = 1;
          }
          rechargeWithdrawalMethod({
            iosAlipay: this.withdrawalZhifubaoA, //ios支付宝  1.开 2.关
            iosWeChat: this.withdrawalWeixinA, //ios微信  1.开 2.关
            androidAlipay: this.withdrawalZhifubaoB, //android支付宝  1.开 2.关
            androidWeChat: this.withdrawalWeixinB, //android微信  1.开 2.关
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-android支付宝
    withdrawalAndroidPayWxStatusAndroidAlipay(index) {
      this.$confirm("安卓支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.withdrawalZhifubaoB = 2;
          } else {
            this.withdrawalZhifubaoB = 1;
          }
          rechargeWithdrawalMethod({
            iosAlipay: this.withdrawalZhifubaoA, //ios支付宝  1.开 2.关
            iosWeChat: this.withdrawalWeixinA, //ios微信  1.开 2.关
            androidAlipay: this.withdrawalZhifubaoB, //android支付宝  1.开 2.关
            androidWeChat: this.withdrawalWeixinB, //android微信  1.开 2.关
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //支付方式-android微信
    withdrawalAndroidPayWxStatus(index) {
      this.$confirm("安卓支付方式开/关操作, 是否继续?", "支付方式", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          if (index == 1) {
            this.withdrawalWeixinB = 2;
          } else {
            this.withdrawalWeixinB = 1;
          }
          rechargeWithdrawalMethod({
            iosAlipay: this.withdrawalZhifubaoA, //ios支付宝  1.开 2.关
            iosWeChat: this.withdrawalWeixinA, //ios微信  1.开 2.关
            androidAlipay: this.withdrawalZhifubaoB, //android支付宝  1.开 2.关
            androidWeChat: this.withdrawalWeixinB, //android微信  1.开 2.关
          }).then((res) => {
            if (res.code == 0) {
              this.$message({
                type: "success",
                message: "操作成功",
              });
              this.reload();
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消操作",
          });
        });
    },
    //汇率调整
    rechargeModify() {
      rechargeModify({
        gemstone: this.gemstone, //宝石
        rmb: this.rmb, //人民币
        gemToRMB: this.gemToRMB, //宝石转人民币
      }).then((res) => {
        if (res.code == 0) {
          this.$message({
            type: "success",
            message: "修改成功",
          });
          this.reload();
        }
      });
    },
    //分页
    getList() {
      this.loading = true;

      rechargeBack({
        pageSize: this.pageSize,
        page: this.page,
      }).then((res) => {
        if (res.code == 0) {
          this.payPingguoA = res.data.payPingguoA;
          this.payZhifubaoA = res.data.payZhifubaoA;
          this.payWeixinA = res.data.payWeixinA;
          this.payZhifubaoB = res.data.payZhifubaoB;
          this.payWeixinB = res.data.payWeixinB;
          this.withdrawalZhifubaoA = res.data.withdrawalZhifubaoA;
          this.withdrawalWeixinA = res.data.withdrawalWeixinA;
          this.withdrawalZhifubaoB = res.data.withdrawalZhifubaoB;
          this.withdrawalWeixinB = res.data.withdrawalWeixinB;
          this.total = parseInt(res.data.total);
          this.tableData = res.data.list;
          this.loading = false;
        }
      });
    },
    //充值、提现、计费时长配置项列表回填
    globalsetRechargeDemoList() {
      this.coinLoadingA = true;
      globalsetRechargeDemoList({}).then((res) => {
        if (res.code == 0) {
          this.tableDataB = res.data.rechargeIosList; //充值项列表
          this.tableDataC = res.data.rechargeAndroidList; //充值项列表
          this.tableDataE = res.data.withdrawList; //提现列表
          this.tableDataG = res.data.dataBilling; //时间列表
          this.options = res.data.rechargeAndroidList; //充值档位下拉框
          this.coinTableDataA = res.data.rechargeIosGoldList; //充值档位下拉框
          this.coinTableDataB = res.data.rechargeAndroidGoldList; //充值档位下拉框
          this.tableDataI = res.data.reservaPrice; //充值档位下拉框
          this.coinLoadingA = false;
        }
      });
    },
    //首充特惠
    globalsetFirstChargeList() {
      globalsetFirstChargeList({}).then((res) => {
        if (res.code == 0) {
          this.iosPrice = res.data.ios.price;
          this.iosCoin = res.data.ios.coin;
          this.androidPrice = res.data.android.price;
          this.androidCoin = res.data.android.coin;
          if (res.data.android.is_del == 2) {
            this.androidbol = false;
          } else {
            this.androidbol = true;
          }
          if (res.data.ios.is_del == 2) {
            this.iosbol = false;
          } else {
            this.iosbol = true;
          }
        }
      });
      this.firstChargeLoading = true;
      globalsetLog({
        type: 5, //1.充值 2.提现档位 3.计时收费 4.充值金币  5.首充
        page: this.firstChargePage,
        pageSize: this.firstChargePageSize,
      }).then((res) => {
        if (res.code == 0) {
          this.firstChargeTableData = res.data.list;
          this.firstChargeTotal = parseInt(res.data.total);
          this.firstChargeLoading = false;
        }
      });
    },
    //首充特惠更新按钮
    globalsetRenewFirstChargeBtn(type) {
      if (type == 2) {
        globalsetRenewFirstCharge({
          type: type,
          price: this.iosPrice,
          coin: this.iosCoin,
          is_del: this.iosStatus,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              type: "success",
              message: "更新成功",
            });
            this.reload();
          }
        });
      } else {
        globalsetRenewFirstCharge({
          type: type,
          price: this.androidPrice,
          coin: this.androidCoin,
          is_del: this.androidStatus,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              type: "success",
              message: "更新成功",
            });
            this.reload();
          }
        });
      }
    },
    //首充分页
    firstChargeGetList() {
      this.firstChargeLoading = true;

      globalsetLog({
        type: 5, //1.充值 2.提现档位 3.计时收费 4.充值金币  5.首充
        page: this.firstChargePage,
        pageSize: this.firstChargePageSize,
      }).then((res) => {
        if (res.code == 0) {
          this.firstChargeTableData = res.data.list;
          this.firstChargeTotal = parseInt(res.data.total);
          this.firstChargeLoading = false;
        }
      });
    },
    // 宝石兑换金币列表
    async getGemstoneList() {
      let { code, data } = await getGemstoneList_api({});
      if (code == 0) {
        console.log(data, "5555");
        this.tableDataW = data;
      }
    },
    // 新增宝石兑换金币
    addGemstone() {
      // this.getGemstoneList();
      this.tableDataW.push({
        gold: "",
        diamonds: "",
      });
    },
    // 确认/更新
    async gemstonSubmit(row) {
      // console.log(row, "9527");
      // console.log(this.tableDataW, "9563");
      let arr = this.tableDataW;
      let { code, data } = await editGemstoneList_api({
        content: arr,
      });
      if (code == "0") {
        this.$message({
          type: "success",
          message: "更新成功",
        });
        this.getGemstoneList();
      }
    },
    // 删除
    delGemston(index, row) {
      // console.log(index);
      this.$confirm("此操作将删除该条信息, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.tableDataW.splice(index, 1);
          this.gemstonSubmit();
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    //充值档位
    // 添加字段按钮
    addIosRechargeGearBtn() {
      // 向表格数组中数据添加一行
      this.tableDataB.push({
        title: "",
        coin: "",
        price: "",
        rechargeid: "",
        id: "",
        rechargeType: 2,
        describe: "",
        type: "2",
        oldamount: "",
        label: "",
        vipday: "",
      });
    },
    addAndroidRechargeGearBtn() {
      // 向表格数组中数据添加一行
      this.tableDataC.push({
        title: "",
        coin: "",
        price: "",
        rechargeId: "",
        id: "",
        rechargeType: "",
        describe: "",
        type: "2",
        oldamount: "",
        label: "",
        vipday: "",
      });
    },
    //充值确认IOS
    confirmIosRechargeGearBtn(index, row) {
      // if (
      //   row.title &&
      //   row.price &&
      //   row.describe &&
      //   row.oldamount &&
      //   row.label &&
      //   row.vipday &&
      //   row.type !== ""
      // ) {
      if (
        row.title === "" ||
        row.price === "" ||
        row.describe === "" ||
        row.oldamount === "" ||
        // row.label === "" ||
        row.rechargeid === "" ||
        row.vipday === ""
      ) {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
        return;
      }
      globalsetAddRechargeDemo({
        id: row.id, //不传就是新增，传了就是编辑
        coin: row.coin, //金币数
        rmb: row.price, //人民币
        rechargeId: row.rechargeid, //充值id
        sort: "", //排序值  越大越靠前
        type: 2, //1.安卓 2.ios
        prepaid: "", //安卓的档位id
        title: row.title, //标题
        rechargeType: row.type, //
        describe: row.describe,
        oldAmount: row.oldamount, //原价
        label: row.label, //优惠
        vipDay: row.vipday, //优惠
        operator: localStorage.getItem("SET_NAME"),
      }).then((res) => {
        if (res.code == 0) {
          this.$message({
            message: "添加成功",
            type: "success",
          });
          this.reload();
        }
      });
      // } else {
      //   this.$message({
      //     message: "必填不能为空",
      //     type: "info",
      //   });
      // }
    },
    // 苹果删除按钮
    deleteIosRechargeGearBtn(index, row) {
      if (row.id == "") {
        this.tableDataB.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 2, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    //充值确认安卓
    confirmAndroidRechargeGearBtn(index, row) {
      if (
        row.title &&
        row.price &&
        row.describe &&
        row.oldamount &&
        // row.label &&
        row.vipday &&
        row.type !== ""
      ) {
        globalsetAddRechargeDemo({
          id: row.id, //不传就是新增，传了就是编辑
          coin: row.coin, //金币数
          rmb: row.price, //人民币
          rechargeId: row.rechargeid, //充值id
          sort: "0", //排序值  越大越靠前
          type: 1, //1.安卓 2.ios
          prepaid: row.id, //安卓的档位id
          title: row.title, //标题
          rechargeType: row.type, //标题 1金币 2卡
          describe: row.describe,
          oldAmount: row.oldamount, //原价
          label: row.label, //优惠
          vipDay: row.vipday, //优惠
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              message: "添加成功",
              type: "success",
            });
            this.reload();
          }
        });
      } else {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
      }
    },
    // 安卓删除按钮
    deleteAndroidRechargeGearBtn(index, row) {
      if (row.id == "") {
        this.tableDataC.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 1, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    //充值日志
    rechargeGearLog() {
      this.loadingD = true;
      globalsetLog({
        type: 1, //1.充值 2.提现档位 3.计时收费
        page: this.pageB,
        pageSize: this.pageSizeB,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataD = res.data.list;
          this.totalB = parseInt(res.data.total);
          this.loadingD = false;
        }
      });
    },
    //分页
    getListB() {
      this.loadingD = true;

      globalsetLog({
        type: 1, //1.充值 2.提现档位 3.计时收费
        page: this.pageB,
        pageSize: this.pageSizeB,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataD = res.data.list;
          this.totalB = parseInt(res.data.total);
          this.loadingD = false;
        }
      });
    },
    //金币充值档位
    // 金币充值档位 ios添加字段按钮
    addIosCoinBtn() {
      this.coinTableDataA.push({
        coin: "",
        price: "",
        rechargeid: "",
        id: "",
        describe: "",
        givinggold: "",
        label: "",
      });
    },
    //金币充值档位 ios确认
    coinConfirmationIosBtn(index, row) {
      if (
        row.coin &&
        row.price &&
        row.rechargeid &&
        row.describe &&
        row.givinggold !== ""
      ) {
        globalsetAddGoldDemo({
          type: 2, //套餐设备（1：安卓  2：IOS）
          coin: row.coin, //充值金币
          price: row.price, //充值金额
          msg: row.describe, //描述
          givingGold: row.givinggold, //赠送金币
          rechargeId: row.rechargeid, //充值id
          id: row.id, //充值id
          label: row.label,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              message: "添加成功",
              type: "success",
            });
            this.reload();
          }
        });
      } else {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
      }
    },
    //金币充值档位 ios删除
    coinDelIosBtn(index, row) {
      if (row.id == "") {
        this.coinTableDataA.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 5, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位 5是金币充值
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    // 金币充值档位 Android添加字段按钮
    addAndroidCoinBtn() {
      this.coinTableDataB.push({
        coin: "",
        price: "",
        rechargeid: "",
        id: "",
        describe: "",
        givinggold: "",
        label: "",
      });
    },
    //金币充值档位 Android确认
    coinConfirmationAndroidBtn(index, row) {
      if (row.coin && row.price && row.describe && row.givinggold !== "") {
        globalsetAddGoldDemo({
          type: 1, //套餐设备（1：安卓  2：IOS）
          coin: row.coin, //充值金币
          price: row.price, //充值金额
          msg: row.describe, //描述
          givingGold: row.givinggold, //赠送金币
          rechargeId: row.rechargeid, //充值id
          id: row.id, //充值id
          label: row.label,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              message: "添加成功",
              type: "success",
            });
            this.reload();
          }
        });
      } else {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
      }
    },
    //金币充值档位 Android删除
    coinDelAndroidBtn(index, row) {
      if (row.id == "") {
        this.coinTableDataB.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 5, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位 5是金币充值
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    //金币充值分页
    coinGetList() {
      this.coinLoading = true;
      globalsetLog({
        type: 4, //1.充值 2.提现档位 3.计时收费 4.充值金币  5.首充
        page: this.coinPage,
        pageSize: this.coinPageSize,
      }).then((res) => {
        if (res.code == 0) {
          this.coinTableData = res.data.list;
          this.coinTotal = parseInt(res.data.total);
          this.coinLoading = false;
        }
      });
    },
    //金币充值日志
    coinLog() {
      this.coinLoading = true;

      globalsetLog({
        type: 4, //1.充值 2.提现档位 3.计时收费 4.充值金币  5.首充
        page: this.coinPage,
        pageSize: this.coinPageSize,
      }).then((res) => {
        if (res.code == 0) {
          this.coinTableData = res.data.list;
          this.coinTotal = parseInt(res.data.total);
          this.coinLoading = false;
        }
      });
    },
    //提现档位
    // 添加字段按钮
    addWithdrawalPositionBtn() {
      // 向表格数组中数据添加一行
      this.tableDataE.push({
        id: "",
        coin: "", //
        rmb: "", //
        isaudit: "", //
        creditTsv: "",
      });
    },
    // 删除按钮
    deleteWithdrawalPositionBtn(index, row) {
      if (row.id == "") {
        this.tableDataE.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 3, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    //提现档位确认按钮
    confirmWithdrawalPositionBtn(index, row) {
      if (row.coin && row.price && row.isaudit && row.credittsv !== "") {
        globalsetAddWithdrawDemo({
          id: row.id,
          coin: row.coin,
          rmb: row.price,
          isAudit: row.isaudit,
          creditTsv: row.credittsv,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              message: "添加成功",
              type: "success",
            });
            this.reload();
          }
        });
      } else {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
      }
    },
    //提现日志
    withdrawalPositionLog() {
      this.loadingF = true;
      globalsetLog({
        type: 2, //1.充值 2.提现档位 3.计时收费
        page: this.pageC,
        pageSize: this.pageSizeC,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataF = res.data.list;
          this.totalC = parseInt(res.data.total);
          this.loadingF = false;
        }
      });
    },
    //分页
    getListC() {
      this.loadingF = true;

      globalsetLog({
        type: 2, //1.充值 2.提现档位 3.计时收费
        page: this.pageC,
        pageSize: this.pageSizeC,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataF = res.data.list;
          this.totalC = parseInt(res.data.total);
          this.loadingF = false;
        }
      });
    },
    //计时收费
    // 添加字段按钮
    addTimeChargeBtn() {
      // 向表格数组中数据添加一行
      this.tableDataG.push({
        op_type: "",
        price: "",
      });
    },
    // 时长确定
    confirmTimeChargeBtn(index, row) {
      if (row.price !== "") {
        // globalsetAddTimeDemo({
        //   id: row.id, //不传为新增，传了为修改
        //   name: row.name, //阶段名称
        //   time: row.seconds, // 时间 单位:秒
        //   coin: row.coin, //金币数
        //   stage: row.phase, //阶段值
        //   reward: row.reward,
        //   coinB: row.coinB,
        //   rewardB: row.rewardB,
        // }).then((res) => {
        //   if (res.code == 0) {
        //     this.$message({
        //       message: "添加成功",
        //       type: "success",
        //     });
        //     this.reload();
        //   }
        // });
        globalsetAddDataBill({
          field: row.field,
          price: row.price,
          op_type: row.op_type,
          operator: localStorage.getItem("SET_NAME"),
        }).then((res) => {
          if (res.code == 0) {
            this.$message({
              message: "添加成功",
              type: "success",
            });
            this.reload();
          }
        });
      } else {
        this.$message({
          message: "必填不能为空",
          type: "info",
        });
      }
    },
    // 删除按钮
    deleteTimeChargeBtn(index, row) {
      if (row.id == "") {
        this.tableDataG.splice(index, 1);
      } else {
        this.$confirm("此操作将删除该条配置, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            globalsetDel({
              id: row.id,
              type: 4, //1.android充值 2.ios充值 3.提现档位 4.计费时长档位
            }).then((res) => {
              if (res.code == 0) {
                this.$message({
                  message: "删除成功",
                  type: "success",
                });
                this.reload();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      }
    },
    //资料解锁收费
    timeChargeLogA() {
      this.loadingH = true;
      globalsetLog({
        type: 6, //1.充值 2.提现档位 3.计时收费
        page: this.pageD,
        pageSize: this.pageSizeD,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataH = res.data.list;
          this.totalD = parseInt(res.data.total);
          this.loadingH = false;
        }
      });
    },
    //分页
    getListD() {
      this.loadingH = true;

      globalsetLog({
        type: 6, //1.充值 2.提现档位 3.计时收费
        page: this.pageD,
        pageSize: this.pageSizeD,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataH = res.data.list;
          this.totalD = parseInt(res.data.total);
          this.loadingH = false;
        }
      });
    },
    //信誉值预约价格
    // 添加字段按钮
    addCreditBtn() {
      // 向表格数组中数据添加一行
      this.tableDataI.unshift({
        credit: "",
        price: "",
      });
    },
    creditBtn(row) {
      globalsetReservaPrice({
        content: row,
        operator: localStorage.getItem("SET_NAME"),
      }).then((res) => {
        if (res.code == 0) {
          this.$message({
            message: "更新成功",
            type: "success",
          });
          this.reload();
        }
      });
    },
    //资料解锁收费
    timeChargeLog() {
      this.loadingJ = true;
      globalsetLog({
        type: 7,
        page: this.pageE,
        pageSize: this.pageSizeE,
      }).then((res) => {
        if (res.code == 0) {
          this.tableDataJ = res.data.list;
          this.totalE = parseInt(res.data.total);
          this.loadingJ = false;

          for (let i = 0; i < this.tableDataJ.length; i++) {
            var j = this.tableDataJ[i];
            this.tableDataK = j.old_reserva_price;
          }
        }
      });
    },
    //分页
    getListE() {},
    //选项卡
    handleClick(tab) {
      // localStorage.setItem("activeName", tab.name);
    },
  },
  created() {
    this.rechargeBack();
    this.globalsetRechargeDemoList();
    this.timeChargeLog(); //计时收费日志
    this.withdrawalPositionLog(); //提现日志
    this.rechargeGearLog();
    this.globalsetFirstChargeList(); //首充特惠列表
    this.coinLog(); //金币充值日志
    this.timeChargeLogA();
    // this.activeName = localStorage.getItem("activeName");
    this.getGemstoneList();
  },
};
</script>

<style lang="less" scoped>
.paymentSettings {
  height: 100%;
  margin: 20px;
  padding: 20px;
  .payBox {
    display: flex;
    margin-bottom: 40px;
    .card {
      width: 160px;
      text-align: center;
      p {
        margin: 0px;
        cursor: pointer;
      }
      p:hover {
        color: red;
      }
    }
  }
  .el-card {
    padding: 10px;
    margin-right: 40px;

    .paymentMethodBox {
      p {
        font-weight: bold;
      }
      .p {
        margin-right: 20px;
      }
      .ios {
        margin-bottom: 20px;
        display: flex;
        .iosBox {
          display: flex;
          align-items: center;
          img {
            width: 18%;
            margin-right: 10px;
          }
        }
      }
      .tableBox {
        .btnBox {
          display: flex;
          justify-content: space-between;
          span {
            font-size: 18px;
            font-weight: bold;
          }
        }
        .el-table {
          margin-bottom: 80px;
        }
      }
      .inputBox {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        span {
          width: 80px;
          line-height: 40px;
        }
        .el-input {
          width: 300px;
          margin-right: 20px;
        }
        .sign {
          width: 20px;
          display: inline-block;
          margin: 0px 10px;
          text-align: center;
        }
        .el-button {
          margin: 0 10px;
        }
        .signB {
          width: 54px;
        }
        .tableScopeSwitch /deep/ .el-switch__label {
          position: absolute;
          display: none;
          color: #fff;
        }
        /*打开时文字位置设置*/
        .tableScopeSwitch /deep/ .el-switch__label--right {
          z-index: 1;
          right: 20px; /*不同场景下可能不同，自行调整*/
        }
        /*关闭时文字位置设置*/
        .tableScopeSwitch /deep/ .el-switch__label--left {
          z-index: 1;
          left: 20px; /*不同场景下可能不同，自行调整*/
        }
        /*显示文字*/
        /deep/ .tableScopeSwitch .el-switch__label.is-active {
          display: block;
        }
        /deep/ .tableScopeSwitch .el-switch .el-switch__core,
        .el-switch .el-switch__label {
          width: 100px !important; /*开关按钮的宽度大小*/
        }
      }
      .displayPage {
        display: flex;
        .el-input {
          width: 160px;
          margin: 0px;
        }
        .p {
          border: 1px solid #dcdfe6;
          border-left: 0px;
          height: 40px;
          line-height: 20px;
          margin: 0px;
          background: #f5f7fa;
          color: #909399;
          font-size: 14px;
          padding: 10px;
          border-radius: 0px 4px 4px 0px;
        }
      }
    }
  }
  .el-tableBox {
    display: flex;
  }
}
</style>